/* @group Navbar */

/* @group Custom Menu */

.navbar {
  margin-bottom: 0px;
  position: fixed;
  width: 100%;
  top: 0px;
  right: 0px;
  background-image: none;
  z-index: 200;

  .navbar-inner {
    .reset-filter();
    border: none;
    line-height: 0px;
    background-image: none;
    box-shadow: none;

    .btn-navbar {
      float: left;
      margin: 5px 10px 0px;
      .icon-bar {
        background-image: none;
        .box-shadow(0 1px 1px 0 rgba(0,0,0,.45));
      }
    }

    .brand {
      vertical-align: middle;
      text-shadow: none;
      line-height: @navbarHeight;
      padding: 0;
      margin-left: 0px;
      margin-right: 10px;
    }

    ul.nav {
      margin: 0px;
    }

    ul.nav li.dropdown:hover {
      > ul.dropdown-menu {
        display: block;
      }
    }

    #custom_menu_language,
    #custom_menu_courses,
    #custom_menu_themecolours,
    #custom_menu_activitystream,
    #custom_menu {
      display: inline-block;
      vertical-align: top;
    }

    #custom_menu_courses,
    #custom_menu_activitystream,
    #custom_menu_language {
      ul.dropdown-menu {
        max-height: 384px;
        overflow-y: auto;
      }
    }

    .dropdown-menu > li > a:hover,
    .dropdown-menu > li > a:focus,
    .dropdown-submenu:hover > a,
    .dropdown-submenu:focus > a {
      background-image: none;
      text-decoration: none;
    }

    .dropdown .fa {
      margin-right: 5px;
    }

    .open {
      > .dropdown-menu {
        overflow: visible;
        display: block;
      }
    }

    .dropdown-menu {
      z-index: 200;
      margin: 0px;
    }

    .dropdown-menu > li > a,
    .dropdown-submenu > a {
      padding: 3px 25px 3px 15px;
    }

    .dropdown-menu > li > a:hover .fa {
      color: @dropdownLinkColorHover;
    }

    .nav > li.dropdown a,
    .nav > li > a {
      text-shadow: none;
      .fa-caret-right:before {
        margin-left: 5px;
        margin-right: 3px;
        /*@replace: "\f0d9"*/content: "\f0da";
      }
      &:hover {
        background-image: none;
        .fa-caret-right:before {
          content: "\f0d7";
          margin-right: 0px;
        }
      }
    }
    .nav > li.dropdown.open a {
      .fa-caret-right:before {
        content: "\f0d7";
        margin-right: 0px;
      }
    }

    .nav > li.dropdown ul.dropdown-menu > li > a {
      &:hover, &.open {
        .fa {
            color: @dropdownLinkColorHover;
        }
        > .dimmed_text .fa {
            color: @grayLighter;
        }
      }
    }

    .custommenus {
      width: 100%;
    }

    .messagemenu,
    .usermenu,
    .gotobottommenu {
      float: right;
    }

    .usermenu {
      .dropdown {
        img.userpicture {
          vertical-align: top;
          width: auto;
          height: auto;
          max-width: 20px;
          max-height: 20px;
          border-radius: 4px;
          margin-right: 2px;
        }
        a.dropdown-toggle {
          padding: 9px 15px;
        }
        .dropdown-submenu.preferences {
          a.dropdown-toggle {
            padding: 3px 25px 3px 15px;
          }
        }
        ul.dropdown-menu {
          margin: 0px;
          i {
            margin-right: 5px;
            width: 15px;
          }
          hr.sep {
            margin: 0px;
            height: 0px;
            border: none;
          }
        }
      }
    }

    .messagemenu {
      ul.nav {
        > li > a > .fa {
          margin-left: 5px;
        }
        ul.dropdown-menu {
          left: auto;
          right: 10px;
          margin: 0px;
          li > a {
            padding: 0px;
            background: #fff;
            overflow: hidden;
            > .message {
              padding: 5px 10px;
              i {
                margin: 0px 5px;
              }
              .msg-picture {
                float: left;
              }
              .msg-body {
                display: inline-block;
                padding-right: 80px;
                span.msg-sender,
                span.msg-text,
                span.msg-time {
                  float: left;
                  width: 100%;
                }
              }
              &.unread {
                background: @grayLighter;
                .msg-text {
                  font-weight: 700;
                }
              }
              &.read {
                .opacity(75);
              }
            }
            > .notification {
              width: 255px;
              padding: 5px 10px;
              overflow: hidden;
              .icon {
                float: left;
                font-size: 5em;
                margin-top: 5px;
                margin-right: 10px;
              }
              .notification-text {
                width: 185px;
                white-space: normal;
                float: right;
                font-size: 12px;
              }
              .msg-time {
                float: left;
                clear: right;
              }
              &.read {
                .opacity(75);
              }
              &.unread {
                background: @grayLighter;
                .msg-text {
                  font-weight: 700;
                }
              }
            }
            &:hover {
              .message {
                .opacity(100);
              }
            }
          }
          li:first-of-type {
            > a {
              border-top: none;
            }
          }
        }
        ul.dropdown-menu:before,
        ul.dropdown-menu:after {
          left: auto;
          right: 10px;
        }
      }
    }
  }
}

@media (max-width: @navbarCollapseWidth) {
  .navbar {
    .navbar-inner {
      #custom_menu_language,
      #custom_menu_courses,
      #custom_menu_themecolours,
      #custom_menu_activitystream,
      #custom_menu {
        display: inline;
      }
    }
  }
}

/* @end */

/* @group Theme Colours Menu */
a {
  .colours-default, .colours-alternative1, .colours-alternative2, .colours-alternative3, .colours-alternative4 {
    box-shadow: rgba(255, 255, 255, 0.8) 0px 0px 2px 3px;
    border-radius: 2px;
  }
}
/* @end */

.navbar.oldnavbar,
.pagelayout-secure .navbar,
.pagelayout-popup .navbar {
  position: relative;
}

.navbar.oldnavbar.affix {
  position: fixed;
}

/* @end */